<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
<form action="${contextPath }/user/collect/delete.do" method="post">
<table width="100%">
	<tbody>
		<tr>
			<td><input type='checkbox' name="check"/></td><td>产品名称</td><td>店铺</td><td>品牌</td><td>分类</td><td>收藏时间</td>
		</tr>
		<c:if test="${obj.resultList!=null}">
			<c:forEach items="${obj.resultList}" var="o">
				<tr>
					<td><input value="${o.id }" name="ids" type="checkbox"/></td>
					<td><img src="${contextPath }${o.product.image}" width="50px" height="50px"></img><br/>
					<a href="${contextPath}/product_${o.productid}.do">${o.product.productName}</a></td>
					<td><a href="${contextPath}/shop_${o.product.vendor.id}.do">${o.product.vendor.companyName}</a></td>
					<td>${o.product.brand.brandName }</td>
					<td>${o.product.classify.classifyName} </td>
					<td><fmt:formatDate pattern="yyyy-MM-dd hh:mm:ss" value="${o.createTime}" /></td>
				</tr>				
			</c:forEach>
		</c:if>
		<tr><td colspan="6"><button type="submit" onclick="return confirm('确定要删除收藏吗？')">删除</button></td></tr>
	</tbody>
</table>
</form>
<table width="100%">
<tbody>
	<tr><td></td><td>当前第${obj.page.pageNumber }页 ,共${obj.page.recordCount }条记录</td>
		<td>
		<c:if test="${obj.page.first}">
			<a href="javascript:;" onclick="alert('已经是第一页了！')">首页</a>
			<a href="javascript:;" onclick="alert('已经是第一页了！')">前一页</a>
		</c:if>
		<c:if test="${!obj.page.first}">
			<a href="${contextPath }/vendor/collect/manage.do">首页</a>
			<a href="${contextPath }/vendor/collect/manage.do?pageNum=${obj.page.pageNumber-1}">前一页</a>
		</c:if>
		<c:if test="${obj.page.last}">
			<a href="javascript:;" onclick="alert('已经是最后一页了！')">后一页</a>
			<a href="javascript:;" onclick="alert('已经是最后一页了！')">尾页</a>
		</c:if>
		<c:if test="${!obj.page.last}">
			<a href="${contextPath }/vendor/collect/manage.do?pageNum=${obj.page.pageNumber+1}">后一页</a>
			<a href="${contextPath }/vendor/collect/manage.do?pageNum=${obj.page.pageCount}">尾页</a>
		</c:if>
		</td>
		</tr>
</tbody>
</table>
